<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
	<link rel="stylesheet" type="text/css" href="engine1/style.css" />
	<script type="text/javascript" src="engine1/jquery.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Home</title>
<link href="CSS/layouth.css" rel="stylesheet" type="text/css" />
</head>

<body >
<div id="container">
  <div id="Header">
  <img src="images/img.png" alt="Hut" style="float:left;" />
  <ul class="HeaderUl" >
    <li><a href="index1.php" target="_self">&nbsp; Home&nbsp; </a></li>
    <li><a href="createStoreControler.php?action=stores" id="stores" target="_self"> &nbsp;Stores &nbsp;</a></li>
    <li><a href="#" target="_self"> &nbsp;Advertisments&nbsp; </a></li>
    <li><a href="#" target="_self">&nbsp; Link &nbsp;</a></li>
    <li style="border-right-style:none;"><a href="#" target="_self"> &nbsp;Social &nbsp;</a></li>
    <?php

       require_once("include/header.php");
 
require_once("classes.php");


$log=new RegistedUser;
if(!isset($_SESSION))
session_start();

if(isset($_SESSION['login']))
{

	echo'<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'.$_SESSION['user_name'].' &nbsp;<a href="Registration.html" target="_self"></a></li>
    <li style="border-right-style:none;" ><a href="logout.php" target="_self">Log Out</a></li>
  </ul>
	';
	header("Location:index1.php");
	
}
else if(isset($_POST['username'])&&isset($_POST['password']))
{
	
  
$username=$_POST['username'];
$password=$_POST['password'];
	if(!empty($username)&&!empty($password))
	{
	$log->login($username,$password);
		}
	else
	{
		echo "Enter your username and password";

		} 
}



/*if(check_login())
{
	echo'you are log in log<a href="logout.php">logout </a>';
	}
else 
{	
if(isset($_POST['username'])&&isset($_POST['password']))
{
	$username=$_POST['username'];
	$password=$_POST['password'];
	if(!empty($username)&&!empty($password))
	{
		login($username,$password);
	}
	}

	}*/	
?>
    
  <!--<ul style="float:right;display:inline;" >
  <li ><a href="#" target="_self">Log In</a></li>
  </ul>-->
 <!-- End Header Div--> </div>
  <div id="Content">
  		

        <form action="login.php"  method="POST" id="msform">
			<div class="fieldset" style="float:right;background-image:url(images/awel.jpg);">
<br />
<br />
<br />
		<br />
<br />
<br />
		
        <br />
<br />
<br />
		<br />
<br />
<br />
		
		<input type="text" name="username" placeholder="First Name" />
		<input type="password" name="password" placeholder="Password" />
		<input type="submit" name="submit" class="submit action-button" value="log in" />
        <br />
<a href="Registration.php" style="text-align:center;font-size:16px;color:#0C0;text-align:right;" >Create New Account</a>
			</div>
        </form>
	
	<div style="position:relative;">
 
 </div>
  <!-- End Contant Div--></div>
  <!--<div id="Sidebar">
  <p align="center"> Search</p>
  -->
  <!--End SideBar Div</div>-->
  <div id="clear"></div>
  
  <div id="Footer">
  <ul class="HeaderUl"  style="padding-top: 2px;">
    <li><a href="#" target="_self">&nbsp; Company&nbsp; </a></li>
    <li><a href="#" target="_self"> &nbsp;Policies &nbsp;</a></li>
    <li><a href="#" target="_self"> &nbsp;Services&nbsp; </a></li>
    <li><a href="createStoreControler.php?action=stores" id="stores" target="_self">&nbsp; Stores &nbsp;</a></li>
    <li style="border-right-style:none;"><a href="#" target="_self"> &nbsp;Contact Us &nbsp;</a></li>

  </ul>
  <!-- End Footer Div--></div>
  
 
	



<!--End Container Div--></div>
</body>
</html>
